package library_management.user;

import library_management.book.Book;
import library_management.book.BookList;
import library_management.operation.IOperation;

import java.util.Scanner;

public abstract class User {
    //用户名
    protected String name;
    //用户权限
    protected IOperation[] operations;
    //菜单
    public abstract int menu();
    //获取用户输入
    Scanner scanner = new Scanner(System.in);
    //根据用户选择执行操作
    public void doOperation(int choice, BookList bookList){
        operations[choice-1].work(bookList);
    }
}
